﻿function openAdd(url) {
    var sw, sh, left, top;
    if (screen.width != 800) { sw = 1024; sh = 768; }
    left = (screen.width - sw) / 2;
    top = (screen.height - sh) / 2;
    sh = sh - 60;
    sw = sw - 8;
    var orgSelPage = url;
    window.open(orgSelPage, "_blank", "toolbar=no,location=no,directories=no,status=yes,resizable=no,menubar=no,scrollbars=yes,left=" + left + ",top=" + top + ",height=" + sh + ",width=" + sw);
    //self.window.open(orgSelPage, "_blank", "toolbar=no,location=no,directories=no,status=yes,resizable=no,menubar=no,scrollbars=yes,left=" + left + ",top=" + top + ",height=" + sh + ",width=" + sw);
 //   window.location=window.location;
}
function openUpdate(url, id) {
    var sw, sh, left, top;
    if (screen.width != 800) { sw = 1024; sh = 768; }
    left = (screen.width - sw) / 2;
    top = (screen.height - sh) / 2;
    sh = sh - 60;
    sw = sw - 8;
    var orgSelPage = url;
    window.open(orgSelPage, "_blank", "toolbar=no,location=no,directories=no,status=yes,resizable=no,menubar=no,scrollbars=yes,left=" + left + ",top=" + top + ",height=" + sh + ",width=" + sw);
}
function pageCancel() {
    window.opener = null;
        window.close();
    }
    function pageSec(url) {
        var sw, sh, left, top;
        if (screen.width != 800) { sw = 800; sh =500; }
        left = (screen.width - sw) / 2;
        top = (screen.height - sh) / 2;
        sh = sh - 60;
        sw = sw - 8;
        var orgSelPage = url;
        window.open(orgSelPage, "_blank", "toolbar=no,location=no,directories=no,status=yes,resizable=no,menubar=no,scrollbars=yes,left=" + left + ",top=" + top + ",height=" + sh + ",width=" + sw);

    }